package com.voicechat.firstmet.net.service;

import android.util.Log;

import com.voicechat.firstmet.bean.CharmBean;
import com.voicechat.firstmet.bean.GifBean;
import com.voicechat.firstmet.bean.MySelfInfoBean;
import com.voicechat.firstmet.bean.PhotoAlbumBean;
import com.voicechat.firstmet.bean.PhotoAlbumPictureBean;
import com.voicechat.firstmet.bean.VoiceAppraiseBean;
import com.voicechat.firstmet.net.Params;

import rx.Observable;

/**
 * @ProjectName: FirstMet
 * @Package: com.voicechat.firstmet.net.service
 * @ClassName: PersonDataService
 * @Description: 个人主页信息数据
 * @Author: ljp
 * @CreateDate: 2018/10/26 14:58
 * @Version: 1.0
 */
public class PersonDataService extends BaseService {
    private static String TAG = "PersonDataService";

    /**
     * 消费类型 1语聊 2打赏 3送礼 4搭讪
     */
    public interface GIF_TYPE {
        String GIF_VOICE= "1";//1语聊
        String GIF_PLAY = "2";//2打赏
        String GIF_GET = "3";//3送礼
        String GIF_PICKUP = "4";//4搭讪
        String GIF_TASK = "6";//4任务
    }
    /**
     * @method
     * @description  显示粉丝、关注、访客、点赞、土豪值、魅力值、关注状态
     * @date: 2018/10/19 16:42
     * @author: ljp
     * @return
     */
    public static Observable<CharmBean> showPersonState(String token, String equipmentId,String userId,String anchorId) {
        Params params = new Params();
        params.put("token", token);
        params.put("equipmentId", equipmentId);
        params.put("userId", userId);
        params.put("anchorId", anchorId);
        //Log.i(TAG, "likeAndUnLike: ----"+params);
        return sNetInterface.personHomeFans(params).compose(applySchedulers());
    }
    /**
     * @method
     * @description  显示他人主页头信息
     * @date: 2018/10/19 16:42
     * @author: ljp
     * @return
     */
    public static Observable<MySelfInfoBean> showPersonHome(String token, String equipmentId,
                                                            String userId,String anchorId,String vagrancy) {
        Params params = new Params();
        params.put("token", token);
        params.put("equipmentId", equipmentId);
        params.put("userId", userId);
        params.put("anchorId", anchorId);
        params.put("vagrancy",vagrancy);
        Log.i(TAG, "likeAndUnLike: ----"+params);
        return sNetInterface.personHome(params).compose(applySchedulers());
    }
    /**
     * @method
     * @description  显示他人主页个人相册信息
     * @date: 2018/10/19 16:42
     * @author: ljp
     * @return
     */
    public static Observable<PhotoAlbumBean> showPersonPhotos(String token, String equipmentId, String userId) {
        Params params = new Params();
        params.put("token", token);
        params.put("equipmentId", equipmentId);
        params.put("userId", userId);
        params.put("pageSize","10");
        params.put("pageNo","1");
        //params.put("anchorId", anchorId);
        //Log.i(TAG, "likeAndUnLike: ----"+params);
        return sNetInterface.personHomePhotos(params).compose(applySchedulers());
    }
    /**
     * @method
     * @description  显示他人主页他人语聊信息
     * @date: 2018/10/19 16:42
     * @author: ljp
     * @return
     */
    public static Observable<VoiceAppraiseBean> showPersonVoice(String token, String equipmentId, String anchorId) {
        Params params = new Params();
        params.put("token", token);
        params.put("equipmentId", equipmentId);
        //params.put("userId", userId);
        params.put("anchorId", anchorId);
        //Log.i(TAG, "likeAndUnLike: ----"+params);
        return sNetInterface.personHomeVoice(params).compose(applySchedulers());
    }
    /**
     * @method
     * @description  显示他人礼物信息  礼物类型 1语聊 2打赏 3送礼'
     * @date: 2018/10/19 16:42
     * @author: ljp
     * @return
     */
    public static Observable<GifBean> showPersonGif(String token, String equipmentId, String objectid,String type,String page) {
        Params params = new Params();
        params.put("token", token);
        params.put("equipmentId", equipmentId);
        //params.put("userId", userId);
        params.put("objectId", objectid);
        params.put("type",type);
        params.put("pageNo", page);
        params.put("pageSize", "10");//一页返回多少条数据 默认10
        //Log.i(TAG, "likeAndUnLike: ----"+params);
        return sNetInterface.personHomeGif(params).compose(applySchedulers());
    }
    /**
     * @method
     * @description  显示他人主页礼物信息  所有礼物
     * @date: 2018/10/19 16:42
     * @author: ljp
     * @return
     */
    public static Observable<GifBean> personHomeGifAll(String token, String equipmentId, String anchorId,String page) {
        Params params = new Params();
        params.put("token", token);
        params.put("equipmentId", equipmentId);
        params.put("anchorId", anchorId);
        params.put("pageNo", page);
        params.put("pageSize", "10");//一页返回多少条数据 默认10
        //Log.i(TAG, "likeAndUnLike: ----"+params);
        return sNetInterface.personHomeGif(params).compose(applySchedulers());
    }
   /* *//**
     * @method
     * @description  显示他人主页他人动态
     * @date: 2018/10/19 16:42
     * @author: ljp
     * @return
     *//*
    public static Observable<PostBean> showPersonPosts(String token, String equipmentId, String userId, String touristId) {
        Params params = new Params();
        params.put("token", token);
        params.put("equipmentId", equipmentId);
        params.put("userId", userId);
        params.put("touristId", touristId);
        params.put("pageNo", "1");
        params.put("pageSize", "2");//一页返回多少条数据 照片
        //Log.i(TAG, "likeAndUnLike: ----"+params);
        return sNetInterface.personHomePosts(params).compose(applySchedulers());
    }*/
    /**
     * @method
     * @description  查看相册页面数据
     * @date: 2018/10/19 16:42
     * @author: ljp
     * @return
     */
    public static Observable<PhotoAlbumPictureBean> photosAlbum(String token, String equipmentId,
                                                                String userId,String page) {
        Params params = new Params();
        params.put("token", token);
        params.put("equipmentId", equipmentId);
        params.put("userId", userId);
       // params.put("touristId", touristId);
        params.put("pageNo", page);
        params.put("pageSize", "10");//一页返回次照片
        Log.i(TAG, "photosAlbum: ----"+params);
        return sNetInterface.photosAlbum(params).compose(applySchedulers());
    }



}
